package init

import (
	"log"
	// init sqlite3
	_ "github.com/mattn/go-sqlite3"
	"smartconn.cc/liugen/audio"
	"smartconn.cc/liugen/input"
	"smartconn.cc/tosone/ra_main/PFSE"
	"smartconn.cc/tosone/ra_main/coreEvent"
	"smartconn.cc/tosone/ra_main/ledutil"
	// init network status check
	_ "smartconn.cc/tosone/ra_main/netStatus"
	// init database
	_ "smartconn.cc/tosone/ra_main/store"
	// init task mgr
	_ "smartconn.cc/tosone/ra_main/taskMgr"
	// init download service
	_ "smartconn.cc/tosone/ra_main/services/download"
	// init syncStory service
	// _ "smartconn.cc/tosone/ra_main/services/syncStory"
	// init uncompress service
	// _ "smartconn.cc/tosone/ra_main/services/uncompress"
)

func init() {
	ledutil.Close() // close led

	input.Connect("readingangel")
	if flag := PFSE.PFInit(); flag == false {
		log.Println("PageFlip init error.")
		return
	}
	if err := audio.Startup(); err != nil {
		log.Println("AudioMgr startup error.")
		log.Println(err)
		return
	}
	coreEvent.InitBtn()
}
